package com.hanter.downloader;

/**
 * 任务拆分
 */
public class Partial {
    /**
     * start : 0
     * end : 100
     * offset : 2
     */

    // 开始位置（包含）
    private long start;
    // 结束位置（包含）
    private long end;
    private long offset;

    public Partial() {
    }

    public Partial(long start, long end) {
        this(start, end, 0);
    }

    public Partial(long start, long end, long offset) {
        this.start = start;
        this.end = end;
        this.offset = offset;
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return end;
    }

    public void setEnd(long end) {
        this.end = end;
    }

    public long getOffset() {
        return offset;
    }

    public void setOffset(long offset) {
        this.offset = offset;
    }

    @Override
    public String toString() {
        return "Partial{" +
                "start=" + start +
                ", end=" + end +
                ", offset=" + offset +
                '}';
    }
}